/*
 * FileDto.java
 *
 * Created on 2 de octubre de 2006, 11:52 AM
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package com.src.computec.radar.imagen.util;

import java.sql.Timestamp;

/**
 *
 * @author andresoc
 */
public class FileDto implements java.io.Serializable, Comparable {
    
    private String name;
    private Timestamp lastModified;
    
    /** Creates a new instance of FileDto */
    public FileDto() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Timestamp getLastModified() {
        return lastModified;
    }

    public void setLastModified(Timestamp lastModified) {
        this.lastModified = lastModified;
    }

    public String toString() {
        return "FileDto: \n " +
               "name: " + name + "\n" +
               "lastModified: " + lastModified;
    }

    public int compareTo(Object obj) {
        FileDto fileDto = (FileDto) obj;
        return this.lastModified.compareTo(fileDto.getLastModified());
    }
}